package com.love.cloud.admin.notify.controller;


import com.love.cloud.admin.notify.entity.NotifyReply;
import com.love.cloud.admin.notify.service.NotifyReplyService;
import com.love.cloud.admin.notify.vo.ReplyVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/notify/reply")
@Api(tags = "通知公告回复")
public class ReplyController {
    @Resource
    private NotifyReplyService notifyReplyService;

    @GetMapping(value = "/getReplyList/{articleId}")
    public Object getReplyList(@PathVariable Long articleId, ReplyVo replyVo){
        return notifyReplyService.getReplyList(articleId,replyVo);
    }
    @PostMapping(value = "/saveReply")
    @ApiOperation(value = "保存回复")
    public Object saveReply(@RequestBody NotifyReply notifyReply){
        int result= notifyReplyService.saveArticleReply(notifyReply);
        return result;
    }
}
